﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace CampusMarket.Model
{
    public class Goods : INotifyPropertyChanged
    {
        private int _id { get; set; }
        public String Goods_User { get; set; }
        public DateTime Goods_CreateTime { get; set; }
        private String _name = "";
        public String Goods_Name { 
            get { return  _name; } 
            set { _name = value; NotifyPropertyChanged("Goods_Name"); } 
        }
        private String _content = "";
        public String Goods_Content { 
            get { return _content; } 
            set { _content = value; NotifyPropertyChanged("Goods_Content");} 
        }
        private double _originprice = 0.0;
        public double Goods_OriginPrice { 
            get { return _originprice; } 
            set { _originprice = value; NotifyPropertyChanged("Goods_OriginPrice"); } 
        }
        public double Goods_NowPrice { get; set; }
        public Boolean Goods_Status { get; set; }
        public string _imageurl = "";
        public String Goods_ImageUrl { 
            get { return _imageurl; } 
            set { _imageurl = value; NotifyPropertyChanged("Goods_ImageUrl"); } 
        }
        private double _longitude = 0.0;
        public double Goods_longitude { 
            get { return _longitude; } 
            set { _longitude = value; NotifyPropertyChanged("Goods_longitude"); } 
        }
        private double _latitude = 0.0;
        public double Goods_latitude { 
            get { return _latitude; } 
            set { _latitude = value; NotifyPropertyChanged("Goods_latitude"); } 
        }
        public int Goods_Hot { get; set; }
        private String _type = "";
        public String Goods_Type { 
            get { return _type; } 
            set { _type = value; NotifyPropertyChanged("Goods_Type"); } 
        }

        public event PropertyChangedEventHandler PropertyChanged;
        public void NotifyPropertyChanged(string property)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(property));
        }

        //public Goods()
        //{
        //    Goods_Name = String.Empty; Goods_Content = ""; Goods_ImageUrl = ""; Goods_Content = "";
        //}
    }
}
